package cn.ht.jywrwater.module.ht.controller.admin.meterdata.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.ht.jywrwater.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 水表数据 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class MeterDataBaseVO {

    @Schema(description = "水表编号")
    private String meterCode;

    @Schema(description = "上报时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime reportTime;

    @Schema(description = "瞬时水量")
    private Double flowData;

    @Schema(description = "累计水量")
    private Double flowTotal;

    @Schema(description = "电压")
    private Double voltage;

    @Schema(description = "水压")
    private Double waterLevel;

    @Schema(description = "信号强度")
    private Double singleStrength;

    @Schema(description = "0:关闭 1:开启 2:故障 3:其他口", example = "2")
    private Integer valveStatus;

    @Schema(description = "type", example = "2")
    private Integer dataType;

}
